package com.zyq.service.impl;

import java.util.List;

import com.zyq.model.entity.TopicClassification;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zyq.mapper.TopicClassificationMapper;
import com.zyq.service.ITopicClassificationService;

/**
 * 帖子分类Service业务层处理
 *
 * @author zyq
 * @date 2021-12-08
 */
@Service
public class TopicClassificationServiceImpl implements ITopicClassificationService
{
    @Autowired
    private TopicClassificationMapper topicClassificationMapper;

    /**
     * 查询帖子分类
     *
     * @param id 帖子分类ID
     * @return 帖子分类
     */
    @Override
    public TopicClassification selectTopicClassificationById(Long id)
    {
        return topicClassificationMapper.selectTopicClassificationById(id);
    }

    @Override
    public List<TopicClassification> selectTopicClassificationListAll() {
        return topicClassificationMapper.selectTopicClassificationListAll();
    }

    /**
     * 查询帖子分类列表
     *
     * @param topicClassification 帖子分类
     * @return 帖子分类
     */
    @Override
    public List<TopicClassification> selectTopicClassificationList(TopicClassification topicClassification)
    {
        return topicClassificationMapper.selectTopicClassificationList(topicClassification);
    }

    /**
     * 新增帖子分类
     *
     * @param topicClassification 帖子分类
     * @return 结果
     */
    @Override
    public int insertTopicClassification(TopicClassification topicClassification)
    {
        return topicClassificationMapper.insertTopicClassification(topicClassification);
    }

    /**
     * 修改帖子分类
     *
     * @param topicClassification 帖子分类
     * @return 结果
     */
    @Override
    public int updateTopicClassification(TopicClassification topicClassification)
    {
        return topicClassificationMapper.updateTopicClassification(topicClassification);
    }

    /**
     * 批量删除帖子分类
     *
     * @param ids 需要删除的帖子分类ID
     * @return 结果
     */
    @Override
    public int deleteTopicClassificationByIds(Long[] ids)
    {
        return topicClassificationMapper.deleteTopicClassificationByIds(ids);
    }

    /**
     * 删除帖子分类信息
     *
     * @param id 帖子分类ID
     * @return 结果
     */
    @Override
    public int deleteTopicClassificationById(Long id)
    {
        return topicClassificationMapper.deleteTopicClassificationById(id);
    }
}
